Keep orthographic projections consistent #2020
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PROJ is changing the way it handles '+proj=ortho' in spec strings, as of version 7.2. Previously, that projection performed a spheroidal calculation, even with the WGS84 datum. With the change, PROJ uses the precise ellipsoidal shape when projecting.
I encountered and reported this in #2016, because I build Mapper on Linux where PROJ has been at version 7.2 for several months. The new PROJ alters the geographic coordinates of map objects, changing their alignment to georeferenced templates.
This PR includes a regression test of a GPX track template that fails with the latest PROJ due to the track becoming misaligned with the map. It also addresses the problem by inserting '+f=0' into every spec string that uses '+proj=ortho'.
The drawback to this way of keeping Mapper consistent is that it eliminates the possibility of using an ellipsoidal orthographic projection with Mapper, for the time being. The ellipsoidal version is superior, but probably does not matter for orienteering because the spheroidal projection distorts the scale by less than 1%. It looks to me that if this PR is accepted, then to regain support for ellipsoidal orthographic projections would require a new version of the XML file format, and a bigger code change than this one.